from fastapi import FastAPI
from tortoise.contrib.fastapi import register_tortoise
from src.config import settings
from src.api import JOB_ROUTER, BASE_INFO_ROUTER, SCORE_ROUTER,ANALYZES_ROUTER
import uvicorn

main_api = FastAPI()
main_api.include_router(BASE_INFO_ROUTER.base_info_router, prefix="/base_info",tags=['学生基本信息管理'])
main_api.include_router(JOB_ROUTER.job_router, prefix="/job", tags=["学生就业管理"])
main_api.include_router(SCORE_ROUTER.score_router, prefix="/score", tags=["学生考核成绩管理"])
main_api.include_router(ANALYZES_ROUTER.analyzes_router,prefix='/analyzes',tags=['统计分析'])

register_tortoise(main_api, config=settings.TORTOISE_ORM)

if __name__ == '__main__':
    uvicorn.run('main:main_api', host='127.0.0.1', port=8096)
